/<template>
  <div>
    <b v-for="(item,index) in list" :key="index" 
    @click="changeIndex(index)" 
    :class="{on :activeIndex==index}">{{item.title}}</b>
  </div>
</template>

<script>
export default {
  props:{
        list:Array,
        activeIndex:Number,
  },
  methods:{
    changeIndex(index){
      console.log(index);
      this.bus.$emit("changeActive",index);
    }
  }
}
</script>

<style>
b{
  padding: 5px;
}
.on{
  color: #0f0;
}
</style>